<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<script type="text/javascript">
function pic_upload_success(file, data) {
    var json = $.parseJSON(data)
    
    $(this).bjuiajax('ajaxDone', json)
    if (json[BJUI.keys.statusCode] == BJUI.statusCode.ok) {
        $('#headimg').val(json.navTabId).trigger('validate')
        $('#headimg_span').html('<img src="'+ json.navTabId +'" width="100" />')
    }
}
</script>
<div class="bjui-pageContent">
    <form action="/manage/updatePushMessageTime.im" id="managerForm" class="pageForm" method="post" data-toggle="validate">
    	<input type="hidden" value="${pushMessageTime.id }" name="id">
        <div class="pageFormContent" data-layout-h="0">
            <table class="table table-condensed table-hover" width="100%">
                <tbody>
                    <tr style="border:  solid 1px #ccc">
                        <td>
                            <label for="code" class="control-label x85">提前：</label>
                            <input type="number" value="${pushMessageTime.day }" onkeyup='this.value=this.value.replace(/[^0-9]\D*$/,"")' ondragenter="return false" onpaste="return !clipboardData.getData('text').match(/\D/)"  name="day" id="day">天
                        </td>
                    </tr>
                     <tr style="border:  solid 1px #ccc">
                        <td>
                            <label for="code" class="control-label x85">推送时间：</label>
                            <input type="text" value="${pushMessageTime.time }" data-toggle="datepicker" data-pattern="HH:mm" id="time" name="time" readonly="readonly">
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
        <div class="bjui-footBar">
            <ul style="text-align: center;">
                <li style="float: none"><button type="submit" id="subBtn" class="btn-default" data-icon="save">保存</button></li>
            </ul>
        </div>
    </form>
       <script type="text/javascript">
    		$('#subBtn').click(function() {
    			var day= $("#day").val();
    			if(day==''){
    				 $(this).alertmsg('warn', '请输入提前天数')
		    		 return false;
    			}
    			var reg = new RegExp("^[0-9]*$");  
				 if(!reg.test(day)){  
		        	$(this).alertmsg('warn', '提前天数为大于等于0的数字')
		        	return false;
			    }  
			});
    </script>
</div>